home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_vol_lavabubble.cog < prev    next >
Text File  |  1999-11-15  |  2KB  |  88 lines

  1. # Jones 3D Cog Script
  2. #
  3. # Gen_Lavabubble.cog
  4. #
  5. # Sophia helps Indy through a critical gate
  6. #
  7. # [CMG]
  8. #
  9. # (C) 1999 LucasArts Entertainment Co. All Rights Reserved
  10. # ========================================================================================
  11.  
  12. symbols
  13.  
  14. # ................... MESSAGES ...................
  15.  
  16.     message    startup        
  17.     message    user0
  18.     message    arrived
  19.     
  20. # .................. OBJECTS .....................    
  21.  
  22.     thing        bubble
  23.     thing        particlespot
  24.  
  25. # ................. MATERIAL ....................
  26.  
  27.     material    bubbleskin=bubble_a4lava_top.mat        local
  28.     material    lavaskin=gen_a4sfx_lava_particle.mat    local
  29.  
  30.  
  31. # ................. TEMPLATES ....................
  32.     template    particlesystem
  33.  
  34.  
  35. # ................. SOUNDS ....................
  36.  
  37.     sound        bloop=gen_lava_blurp_a.wav                local
  38.  
  39.  
  40. # ................. VARS ....................
  41.     int            track                                    local
  42.  
  43. end
  44.  
  45. # ==============================================================================
  46.  
  47. code
  48.  
  49. startup:
  50.     # make the bubble invisible
  51.     SetThingFlags(bubble, 0x10);
  52.     return;
  53.  
  54. # ..............................................................................
  55.  
  56. user0:
  57.  
  58.     ClearThingFlags(bubble, 0x10);
  59.     SetMaterialCel(bubbleskin, 0);
  60.     MoveToFrame(bubble, 1, 1.0);
  61.  
  62.     track=MaterialAnim(bubbleskin, 16, 0x0);
  63.     return;
  64.  
  65. # ..............................................................................
  66. arrived:
  67.  
  68. If ((GetSenderRef() == bubble) && (GetCurFrame(bubble) == 1))
  69. {
  70.     Sleep(0.45);
  71.     SetThingFlags(bubble, 0x10);
  72.     SetMaterialCel(lavaskin, 0);
  73.     PlaySoundThing(bloop, particlespot, 1.0, 8, 15, 0x0); 
  74.     CreateThing(particlesystem, particlespot);
  75.     #MaterialAnim(lavaskin, 16, 0);
  76.     MoveToFrame(bubble, 0, 50);
  77. }
  78.  
  79. return;
  80.  
  81.  
  82.  
  83. # ..............................................................................
  84. end
  85.  
  86.  
  87.  
  88.